}))
.env("DEBUG", Some(profile.get_debug().to_string()))
.env("OPT_LEVEL", Some(profile.get_opt_level().to_string()))
- .env("PROFILE", Some(profile.get_env()));
+ .env("PROFILE", Some(profile.get_env()))
+ .env("HOST", Some(cx.config.rustc_host()));
// Be sure to pass along all enabled features for this package, this is the
// last piece of statically known information that we have.
* `TARGET` - the target triple that is being compiled for. Native code should be
compiled for this triple. Some more information about target
triples can be found in [clang's own documentation][clang].
+* `HOST` - the host triple of the rust compiler.
* `NUM_JOBS` - the parallelism specified as the top-level parallelism. This can
be useful to pass a `-j` parameter to a system like `make`.
* `CARGO_MANIFEST_DIR` - The directory containing the manifest for the package
assert!(out.as_slice().starts_with(r"{0}"));
assert!(Path::new(out).is_dir());
+ let _host = os::getenv("HOST").unwrap();
+
let _feat = os::getenv("CARGO_FEATURE_FOO").unwrap();
}}
"#,